package com.front.teacher.teacherapp.view.activity.login;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;
import android.widget.EditText;

import com.front.teacher.teacherapp.R;
import com.front.teacher.teacherapp.base.BaseMvpActivity;
import com.front.teacher.teacherapp.presenter.ForgetPresenter;
import com.front.teacher.teacherapp.view.impl.IForgetView;

import butterknife.ButterKnife;
import butterknife.InjectView;
import butterknife.OnClick;

public class ForgetActivity extends BaseMvpActivity<IForgetView, ForgetPresenter> implements IForgetView {
    private Context mContext = this;

    @InjectView(R.id.edit_name_forget)
    EditText editNameForget;
    @InjectView(R.id.edit_number_forget)
    EditText editNumberForget;
    @InjectView(R.id.edit_email_forget)
    EditText editEmailForget;
    @InjectView(R.id.button_next_forget)
    Button buttonNextForget;

    @Override
    public ForgetPresenter initPresenter() {
        return new ForgetPresenter(this);
    }

    @Override
    public void initView() {

    }

    @Override
    public int getLayoutId() {
        return R.layout.activity_forget;
    }

    @OnClick(R.id.button_next_forget)
    public void onClick() {
        String name = editNameForget.getText().toString();
        String number = editNumberForget.getText().toString();
        String email = editEmailForget.getText().toString();
        presenter.getForget(name,number,email);
    }

    @Override
    public void onSuccess() {
        finish();
    }

    @Override
    public void onFail() {

    }
}
